repo: Expose dfd_as_file()
authorColin Walters <walters@verbum.org>
Tue, 21 Sep 2021 12:59:17 +0000 (08:59 -0400)
committerColin Walters <walters@verbum.org>
Fri, 6 May 2022 16:53:57 +0000 (12:53 -0400)
commit955f0ddb9db33947a3fc806d9d3f2fcbb9a3b08f
treeaec408fc699bb0fc1b57350b0fd3a36700b7bf9b
parente33767cc2a3d5e69538be4b0b8484780f64c0938
repo: Expose dfd_as_file()

The `dfd()` API returns just an integer.  Add a safe API that
makes a copy of the fd.  What we really want here is `BorrowedFd` from
https://github.com/rust-lang/rfcs/blob/master/text/3128-io-safety.md
but that isn't here yet.
rust-bindings/rust/src/repo.rs
rust-bindings/rust/tests/repo/mod.rs